﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace eAssessment.questions
{
    class MultipleChoiceQuestionTemplate : Question
    {
        private Dictionary<string, bool> _answers = new Dictionary<string, bool>();

        public Dictionary<string, bool> Answers
        {
            get { return _answers; }
            set { _answers = value; }
        }

        public MultipleChoiceQuestionTemplate(SPLinqPortal.QuestionTemplate question)
        {
            _questionText = question.QuestionText;
            _theme = question.Theme;
            _type = question.Type.ToString();
        }

        public MultipleChoiceQuestionTemplate() { }

        public void AddAnswer(string answer, bool isCorrect)
        {
            try
            {
                _answers.Add(answer, isCorrect);
            }
            catch (ArgumentException ae)
            { Console.WriteLine(ae.Message); }
        }
    }
}
